$(function() {
	$.post("linkSourceAction_listAll", function(data) {
		$.each(data.list, function(i, r) {
			if (r.sourceType == 0) {//js
				if($('script[src="'+r.id+'"]').length==0){
					$('<script></script>').attr({
						type:"text/javascript",
						src:r.id
					}).appendTo('head');
				}
			} else if (r.sourceType == 1) {//css
				if($('link[href="'+r.id+'"]').length==0){
					$('<link></link>').attr({
						rel:"stylesheet",
						type:"text/css",
						href:r.id
					}).appendTo('head');
				}
			}
		});
	});
});